<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      /* 
      对象的属性可以通过 [] 读写, [] 是任意的表达式，能返回key就可以
      */
      const temp = 'temp'
      const obj = {
        name: 'zs',
        age: 20,
        ['gen' + 'der']: 1,
        [temp]: 123,
      }
      console.log('obj -----> ', obj)
    </script>
  </body>
</html>
